﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class TOCDOBUS
    {
        public TOCDOBUS() { }
        public static bool Insert(TOCDO td)
        {
            TOCDODAO dao = new TOCDODAO();
            return dao.Insert(td);
        }
        public static bool Update(TOCDO td)
        {
            TOCDODAO dao = new TOCDODAO();
            return dao.Update(td);
        }
        public static bool Delete(TOCDO td)
        {
            TOCDODAO dao = new TOCDODAO();
            return dao.Delete(td);
        }
        public static DataTable SelectAll()
        {
            TOCDODAO dao = new TOCDODAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(TOCDO td)
        {
            TOCDODAO dao = new TOCDODAO();
            return dao.SelectByPK(td);
        }
        public static string GetID()
        {
            TOCDODAO dao = new TOCDODAO();
            return "TD" + dao.GetID().ToString();
        }
    }
}
